{% extends "../base_adminlte.html" %}

{% block content %}
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
    <div class="content-header">
    </div>

  <section class="content">
      <form  action="{% url 'hostsadd' %}" method="post">
            <table style="border-collapse:separate; border-spacing: 0px 10px;
            margin-left: 400px;margin-top: 60px;align-content: center;">
            <tr>
                <td>系统</td>
                  <td>
                        <select id='systemname' name="systemname" class="form-control"  >
                              <option value="" >请选择</option>
                                 {% for i in system %}
                                      <option value="{{ i }}">
                                          {{  i }}
                                      </option>
                                  {% endfor %}
                         </select>
                    </td>
                <td>*必填项</td>
            </tr>
                <tr>
                    <td>服务</td>
                    <td><input type="text" name="servicename" value="{{ hosts.servicename }}" >
                    <label>*必填项</label>
                    </td>
                </tr>
                <tr>
                    <td>集群</td>
                    <td><input type="text" name="clustername" value="{{ hosts.clustername }}" >
                    <label>*必填项</label>
                    </td>
                </tr>
                <tr>
                    <td>服务器</td>
                    <td><input type="text" name="hostname" value="{{ hosts.hostname }}" >
                    <label>*必填项</label>
                    </td>
                </tr>
                <tr>
                    <td>位置</td>
                    <td><input type="text" name="Location" value="{{ hosts.location }}" >
                    </td>
                </tr>
                <tr>
                    <td>IP</td>
                    <td><input type="text" name="ip" value="{{ hosts.ip }}" >
                    <label>*必填项</label>
                    </td>
                </tr>
                <tr>
                    <td>类型</td>
                    <td><input type="text" name="type" value="{{ hosts.type }}" >
                    </td>
                </tr>
                <tr>
                    <td>ansible组</td>
                    <td><input type="text" name="groups" value="{{ hosts.groups }}" >
                    </td>
                <tr>
                    <td>4A</td>
                    <td>
                        <select id='in4A' name="in4A"  >
                            <option value="True" >是</option>
                            <option value="False">否</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>管理</td>
                    <td>
                        <select id='manage' name="manage"  >
                            <option value="True" >是</option>
                            <option value="False">否</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>产品</td>
                    <td><input type="text" name="product" value="{{ hosts.product }}" >
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td ><input type="submit" value="提交" >
                   <button style="margin-left: 10%" onclick="location.href='/ansible/hostslist'" type="button" value="取消" >取消</button></td>
               </tr>
            </table>
    </form>
  </section>
</div>
{% endblock %}
